<template>
  <Descriptions :column="2" bordered class="dashed">
    <DescriptionsItem label="备案编码">{{ detail?.jgbaCode }}</DescriptionsItem>
    <DescriptionsItem label="单位工程名称">{{ detail?.singleName }}</DescriptionsItem>
    <DescriptionsItem label="项目名称">{{ detail?.projectName }}</DescriptionsItem>
    <DescriptionsItem label="发证时间">{{ parseTime(detail.jgbaBaDate )  }}</DescriptionsItem>
    <DescriptionsItem label="备案机构">{{ detail?.jgbaBaUnit }}</DescriptionsItem>
    <DescriptionsItem label="实际造价（万元）">{{ detail.jgbaFactConst }}</DescriptionsItem>
    <DescriptionsItem label="建筑面积&长度（㎡/m）">{{ detail?.jgbaFactArea }}</DescriptionsItem>
    <DescriptionsItem label="跨度（米）">{{ detail?.span }}</DescriptionsItem>
    <DescriptionsItem label="实际建设规模">{{ detail?.sjjsgm }}</DescriptionsItem>
    <DescriptionsItem label="实际开工">{{ parseTime(detail?.jgbaSdate) }}</DescriptionsItem>
    <DescriptionsItem label="实际竣工">{{ parseTime(detail?.jgbaEdate) }}</DescriptionsItem>
    <DescriptionsItem label="结构体系">{{ detail?.jgysbaJggm }}</DescriptionsItem>
  </Descriptions>

<!--  <DescriptionsItem label="长度">{{ detail?.length }}</DescriptionsItem> -->
</template>
<script lang="ts" >
import {defineComponent, PropType, toRefs} from "vue";
import { parseTime } from '/@/utils';
import { Descriptions } from "ant-design-vue";

interface BaseModel {
  dwgcJgbaId?:string;//	id	string
  jgbaBaDate?:string;//	发证时间	string(date-time)
  jgbaBaUnit?:string;//	备案机构	string
  jgbaCode?:string;//	备案编码	string
  jgbaEdate?:string;//	实际竣工	string(date-time)
  jgbaFactArea?:string;//	建筑面积&长度(平方米/米)	string
  jgbaFactConst?:number;//	实际造价(万元)	number(double)
  jgbaSdate?:string;//	实际开工	string(date-time)
  jgysbaCode?:string;//	工程用途	string
  jgysbaJggm?:string;//	结构体系	string
  length?:number;//	长度	number(double)
  projectName?:string;//	项目名称	string
  singleName?:string;//	单位工程名称	string
  sjjsgm?:string;//	实际建设规模	string
  span?:number;//	跨度	number(double)
}

export default defineComponent({
  props: {
    detail:{
      type: Object as PropType<BaseModel>,
      default: {}
    }
  },
  components:{
    Descriptions,DescriptionsItem:Descriptions.Item,
  },
  setup(props) {
    const { detail } = toRefs(props);
    return {
      detail , parseTime
    }
  }
})
</script>

<style lang="less">
.dashed{
  .ant-descriptions-item-content {
    width: 290px !important;
  }
}

</style>

